package us.language.translate;

import android.app.Activity;
import android.os.Bundle;
import android.view.Display;
import android.view.Gravity;
import android.widget.Button;
import android.widget.TableLayout;
import android.widget.TableRow;

public class MatchScreen extends Activity{
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.match_screen);
		addRow("asdfasdf", "zxcv");
		addRow("12er", "zx656cv");
		addRow("asdfsddddddddddddddddddddddddddddddatrhtyjsdf", "cv");
		addRow("asdfasdf", "zxcytjv");
		
		
	}
	private void addRow(String language1, String language2)
	{
		Display display = getWindowManager().getDefaultDisplay(); 
		
		TableLayout tLayout=(TableLayout) this.findViewById(R.id.match_table);
		TableRow tRow=new TableRow(this);
		Button b1=new Button(this);
		b1.setText(language1);
		b1.setGravity(Gravity.LEFT);
		b1.setWidth(display.getWidth()/2);
		
		Button b2=new Button(this);
		b2.setText(language1);
		b2.setGravity(Gravity.RIGHT);
		b2.setWidth(display.getWidth()/2);
		
		tRow.addView(b1);
		tRow.addView(b2);
		tLayout.addView(tRow);
	}
}
